package HashMap_class;

import java.util.HashMap;
import java.util.Map;

public class AccountStorage
{

    private Map<String, Account> accounts;

    public AccountStorage() {

        this.accounts = new HashMap<String, Account>();

    }

    public void addAccount(String userName, Account acces) {
        accounts.put(userName, acces);

    }

    public void getAccount(String userName) {
        Account acc;
        acc = accounts.get(userName);
        System.out.println(acc.getMoney() + " USD" + " - " + acc.getId());

    }
}
